package edu.ustb.mis.dm.impl.algorithm;

import java.util.List;
import edu.ustb.mis.dm.Constants;
import edu.ustb.mis.dm.impl.data.TextDataOutput;
import edu.ustb.mis.dm.interfaces.data.DataOutput;
import edu.ustb.mis.dm.model.ClusterResult;

public class STextOutputCABOSFV extends AbstractSCABOSFV {
	private DataOutput<ClusterResult> dataOutput;

	// public static long Times = 0;// 这个为了测试用，实际应用中删除哈
	public STextOutputCABOSFV(final List<ClusterResult> instanceList) {
		this.instanceList = instanceList;
	}

	public void execute() {
		// long now = System.currentTimeMillis();
		final List<ClusterResult> crList = cluster();
		// cluster();
		// Times = System.currentTimeMillis() - now + Times;
		dataOutput = new TextDataOutput(Constants.SDIST_PATH, threshhold);
		dataOutput.writefile(crList);
	}

	public void setDataOutput(final DataOutput<ClusterResult> dataOutput) {
		this.dataOutput = dataOutput;
	}
}
